<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>展示判断   v-if v-show</title>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <h3 v-show="show">今天是个好天气!v-show</h3>
        <h3 v-if="show">今天是个好天气!v-if</h3>
        <button @click="showmsg">{{show?'隐藏':'展示'}}</button>
    </div>
</body>
</html>
<script src="./js/2.7.14_dist_vue.js"></script>
<script>
    new Vue({
        el:"#app",
        data:{
            msg:"Hello Vue!",
            show:false,
        },
        methods: {
            showmsg(){
                this.show= !this.show;
            },
        },
    });
</script>